<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

 <%
	String basePath = request.getScheme()+"://"+request.getServerName()
		+ ":"+ request.getServerPort() + request.getContextPath() + "/";
%>
<div>
	<a href="index.do">主页</a>
	<c:if test="${sessionScope.user == null }">
		<a href="user/login.do">登录</a>
		<a href="user/register.do">注册</a>
	</c:if>
	<c:if test="${sessionScope.user != null }">
		<span>${sessionScope.user.username }</span>
		<a href="user/modifyPsd.do">修改密码</a>
		<a href="user/logout.do">退出</a>
	</c:if>
</div>
